{#{% extends 'Base/main.content.lists.div.html.twig' %}#}
{#{% import 'Base/list_item.twig' as listItem %}#}
{% extends 'Back/Sano/list.creator.html.twig' %}
{% import 'Back/Sano/list.item.twig' as listItem %}
{#默认不能删除和新增#}
{#{% block addBtn %}{% endblock %}#}
{#{% block delBtn %}{% endblock %}#}
{% block tableHead %}
    <tr>
        <th align="" width="5%">选择</th>
        <th align="" width="10%">{{config.name.label}}</th>
        <th align="" width="">{{config.replyType.label}}</th>
{#        <th align="" width="40%">{{config.reply.label}}</th>#}
        <th align="" width="10%">消耗积分</th>
        <th align="center" width="8%">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.id }}"/></span>
            </td>
            <td align='' width='' id='name_{{ Entity.id }}'>
                {{ listItem.text('name',Entity.name,Entity.id) }}
            </td>
            <td align='' width='' id='replyType_{{ Entity.id }}'>
{#                {{ listItem.text('replyType',Entity.replyType,Entity.id) }}#}
                {{ Entity.replyType == 0 ?"全部回复":"随机回复一条" }}
            </td>
{#            <td align='' width='' id='reply_{{ Entity.id }}'>#}
{#                {{ render(path("ChatRuleShowReply",{id:Entity.id})) }}#}
{#                {% for item in Entity.reply %}#}
{#                    {% if item.type == "text" %}<p>{{ item.content }}</p>{% endif %}#}
{#                    {% if item.type == "article" %}<p>{{ render(path("ChatRuleShowReply",{id:Entity.id})) }}</p>{% endif %}#}
{#                {% endfor %}#}
{#                {{ listItem.text('reply',Entity.reply,Entity.id) }}#}
{#            </td>#}
            <td align='' width='' id='replyType_{{ Entity.id }}'>
{#                {{ Entity.price }}#}
                {{ listItem.editVal('price',Entity.price,Entity.id) }}
            </td>
            <td align='' width=''>
{#                123123#}
                {{ listItem.edit('ChatRule','',Entity.id) }}
{#                <a>编辑</a>#}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

